package issue;

public class IssueList {
    private static final int DEFAULT_SIZE = 10;
    private Issue[] issues=new Issue[DEFAULT_SIZE];
    int usedSize;//记录问题数量
    public IssueList(){//初始化问题
        issues[0]=new Issue(1,"先有蛋还是先有鸡");
        issues[1]=new Issue(2,"为什么大海是蓝色的");
        issues[2]=new Issue(3,"为什么一年有12个月");
        issues[3]=new Issue(4,"5的平方是多少");
        usedSize=4;
    }

    public Issue getIssues(int pos) {//按照下标返回对应问题
        return this.issues[pos];
    }

    public void setIssues(Issue issues) {//在最后位置增加问题
        this.issues[usedSize]=issues;
    }
public void setIssues(int pos,Issue issue){//在特定下标修改问题
        this.issues[pos]=issue;
}
    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
}
